3.60 \(\int \frac{\csc ^6(c+d x)}{a+b \tan (c+d x)} \, dx\)

Optimal. Leaf size=169 \[ -\frac{\left (2 a^2+b^2\right ) \cot ^3(c+d x)}{3 a^3 d}+\frac{b \left (2 a^2+b^2\right ) \cot ^2(c+d x)}{2 a^4 d}-\frac{\left (a^2+b^2\right )^2 \cot (c+d x)}{a^5 d}-\frac{b \left (a^2+b^2\right )^2 \log (\tan (c+d x))}{a^6 d}+\frac{b \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{a^6 d}+\frac{b \cot ^4(c+d x)}{4 a^2 d}-\frac{\cot ^5(c+d x)}{5 a d} \]

[Out]

-(((a^2 + b^2)^2*Cot[c + d*x])/(a^5*d)) + (b*(2*a^2 + b^2)*Cot[c + d*x]^2)/(2*a^4*d) - ((2*a^2 + b^2)*Cot[c +
d*x]^3)/(3*a^3*d) + (b*Cot[c + d*x]^4)/(4*a^2*d) - Cot[c + d*x]^5/(5*a*d) - (b*(a^2 + b^2)^2*Log[Tan[c + d*x]]
)/(a^6*d) + (b*(a^2 + b^2)^2*Log[a + b*Tan[c + d*x]])/(a^6*d)

________________________________________________________________________________________

Rubi [A]  time = 0.150783, antiderivative size = 169, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3516, 894} \[ -\frac{\left (2 a^2+b^2\right ) \cot ^3(c+d x)}{3 a^3 d}+\frac{b \left (2 a^2+b^2\right ) \cot ^2(c+d x)}{2 a^4 d}-\frac{\left (a^2+b^2\right )^2 \cot (c+d x)}{a^5 d}-\frac{b \left (a^2+b^2\right )^2 \log (\tan (c+d x))}{a^6 d}+\frac{b \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{a^6 d}+\frac{b \cot ^4(c+d x)}{4 a^2 d}-\frac{\cot ^5(c+d x)}{5 a d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^6/(a + b*Tan[c + d*x]),x]

[Out]

-(((a^2 + b^2)^2*Cot[c + d*x])/(a^5*d)) + (b*(2*a^2 + b^2)*Cot[c + d*x]^2)/(2*a^4*d) - ((2*a^2 + b^2)*Cot[c +
d*x]^3)/(3*a^3*d) + (b*Cot[c + d*x]^4)/(4*a^2*d) - Cot[c + d*x]^5/(5*a*d) - (b*(a^2 + b^2)^2*Log[Tan[c + d*x]]
)/(a^6*d) + (b*(a^2 + b^2)^2*Log[a + b*Tan[c + d*x]])/(a^6*d)

Rule 3516

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[(x^m*(a + x)^n)/(b^2 + x^2)^(m/2 + 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

Rule 894

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rubi steps

\begin{align*} \int \frac{\csc ^6(c+d x)}{a+b \tan (c+d x)} \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{\left (b^2+x^2\right )^2}{x^6 (a+x)} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \left (\frac{b^4}{a x^6}-\frac{b^4}{a^2 x^5}+\frac{2 a^2 b^2+b^4}{a^3 x^4}+\frac{b^2 \left (-2 a^2-b^2\right )}{a^4 x^3}+\frac{\left (a^2+b^2\right )^2}{a^5 x^2}-\frac{\left (a^2+b^2\right )^2}{a^6 x}+\frac{\left (a^2+b^2\right )^2}{a^6 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac{\left (a^2+b^2\right )^2 \cot (c+d x)}{a^5 d}+\frac{b \left (2 a^2+b^2\right ) \cot ^2(c+d x)}{2 a^4 d}-\frac{\left (2 a^2+b^2\right ) \cot ^3(c+d x)}{3 a^3 d}+\frac{b \cot ^4(c+d x)}{4 a^2 d}-\frac{\cot ^5(c+d x)}{5 a d}-\frac{b \left (a^2+b^2\right )^2 \log (\tan (c+d x))}{a^6 d}+\frac{b \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{a^6 d}\\ \end{align*}

Mathematica [A]  time = 2.16387, size = 150, normalized size = 0.89 \[ \frac{15 b \left (2 a^2 \left (a^2+b^2\right ) \csc ^2(c+d x)-4 \left (a^2+b^2\right )^2 (\log (\sin (c+d x))-\log (a \cos (c+d x)+b \sin (c+d x)))+a^4 \csc ^4(c+d x)\right )-4 \cot (c+d x) \left (a^3 \left (4 a^2+5 b^2\right ) \csc ^2(c+d x)+25 a^3 b^2+3 a^5 \csc ^4(c+d x)+8 a^5+15 a b^4\right )}{60 a^6 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^6/(a + b*Tan[c + d*x]),x]

[Out]

(-4*Cot[c + d*x]*(8*a^5 + 25*a^3*b^2 + 15*a*b^4 + a^3*(4*a^2 + 5*b^2)*Csc[c + d*x]^2 + 3*a^5*Csc[c + d*x]^4) +
 15*b*(2*a^2*(a^2 + b^2)*Csc[c + d*x]^2 + a^4*Csc[c + d*x]^4 - 4*(a^2 + b^2)^2*(Log[Sin[c + d*x]] - Log[a*Cos[
c + d*x] + b*Sin[c + d*x]])))/(60*a^6*d)

________________________________________________________________________________________

Maple [A]  time = 0.083, size = 273, normalized size = 1.6 \begin{align*} -{\frac{1}{5\,ad \left ( \tan \left ( dx+c \right ) \right ) ^{5}}}-{\frac{2}{3\,ad \left ( \tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{{b}^{2}}{3\,d{a}^{3} \left ( \tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{1}{ad\tan \left ( dx+c \right ) }}-2\,{\frac{{b}^{2}}{d{a}^{3}\tan \left ( dx+c \right ) }}-{\frac{{b}^{4}}{d{a}^{5}\tan \left ( dx+c \right ) }}+{\frac{b}{4\,{a}^{2}d \left ( \tan \left ( dx+c \right ) \right ) ^{4}}}+{\frac{b}{{a}^{2}d \left ( \tan \left ( dx+c \right ) \right ) ^{2}}}+{\frac{{b}^{3}}{2\,d{a}^{4} \left ( \tan \left ( dx+c \right ) \right ) ^{2}}}-{\frac{b\ln \left ( \tan \left ( dx+c \right ) \right ) }{{a}^{2}d}}-2\,{\frac{{b}^{3}\ln \left ( \tan \left ( dx+c \right ) \right ) }{d{a}^{4}}}-{\frac{{b}^{5}\ln \left ( \tan \left ( dx+c \right ) \right ) }{d{a}^{6}}}+{\frac{b\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{{a}^{2}d}}+2\,{\frac{{b}^{3}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{a}^{4}}}+{\frac{{b}^{5}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{a}^{6}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^6/(a+b*tan(d*x+c)),x)

[Out]

-1/5/d/a/tan(d*x+c)^5-2/3/d/a/tan(d*x+c)^3-1/3/d/a^3/tan(d*x+c)^3*b^2-1/d/a/tan(d*x+c)-2/d/a^3/tan(d*x+c)*b^2-
1/d/a^5/tan(d*x+c)*b^4+1/4/d*b/a^2/tan(d*x+c)^4+1/d*b/a^2/tan(d*x+c)^2+1/2/d/a^4*b^3/tan(d*x+c)^2-b*ln(tan(d*x
+c))/a^2/d-2/d/a^4*b^3*ln(tan(d*x+c))-1/d/a^6*b^5*ln(tan(d*x+c))+b*ln(a+b*tan(d*x+c))/a^2/d+2/d/a^4*b^3*ln(a+b
*tan(d*x+c))+1/d/a^6*b^5*ln(a+b*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.09497, size = 227, normalized size = 1.34 \begin{align*} \frac{\frac{60 \,{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{6}} - \frac{60 \,{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \log \left (\tan \left (d x + c\right )\right )}{a^{6}} + \frac{15 \, a^{3} b \tan \left (d x + c\right ) - 60 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \tan \left (d x + c\right )^{4} - 12 \, a^{4} + 30 \,{\left (2 \, a^{3} b + a b^{3}\right )} \tan \left (d x + c\right )^{3} - 20 \,{\left (2 \, a^{4} + a^{2} b^{2}\right )} \tan \left (d x + c\right )^{2}}{a^{5} \tan \left (d x + c\right )^{5}}}{60 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^6/(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/60*(60*(a^4*b + 2*a^2*b^3 + b^5)*log(b*tan(d*x + c) + a)/a^6 - 60*(a^4*b + 2*a^2*b^3 + b^5)*log(tan(d*x + c)
)/a^6 + (15*a^3*b*tan(d*x + c) - 60*(a^4 + 2*a^2*b^2 + b^4)*tan(d*x + c)^4 - 12*a^4 + 30*(2*a^3*b + a*b^3)*tan
(d*x + c)^3 - 20*(2*a^4 + a^2*b^2)*tan(d*x + c)^2)/(a^5*tan(d*x + c)^5))/d

________________________________________________________________________________________

Fricas [B]  time = 2.41224, size = 902, normalized size = 5.34 \begin{align*} -\frac{4 \,{\left (8 \, a^{5} + 25 \, a^{3} b^{2} + 15 \, a b^{4}\right )} \cos \left (d x + c\right )^{5} - 20 \,{\left (4 \, a^{5} + 11 \, a^{3} b^{2} + 6 \, a b^{4}\right )} \cos \left (d x + c\right )^{3} - 30 \,{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5} +{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{4} - 2 \,{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) \sin \left (d x + c\right ) + 30 \,{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5} +{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{4} - 2 \,{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4}\right ) \sin \left (d x + c\right ) + 60 \,{\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right ) - 15 \,{\left (3 \, a^{4} b + 2 \, a^{2} b^{3} - 2 \,{\left (a^{4} b + a^{2} b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{60 \,{\left (a^{6} d \cos \left (d x + c\right )^{4} - 2 \, a^{6} d \cos \left (d x + c\right )^{2} + a^{6} d\right )} \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^6/(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/60*(4*(8*a^5 + 25*a^3*b^2 + 15*a*b^4)*cos(d*x + c)^5 - 20*(4*a^5 + 11*a^3*b^2 + 6*a*b^4)*cos(d*x + c)^3 - 3
0*(a^4*b + 2*a^2*b^3 + b^5 + (a^4*b + 2*a^2*b^3 + b^5)*cos(d*x + c)^4 - 2*(a^4*b + 2*a^2*b^3 + b^5)*cos(d*x +
c)^2)*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2)*sin(d*x + c) + 30*(a^4*b + 2*a^2
*b^3 + b^5 + (a^4*b + 2*a^2*b^3 + b^5)*cos(d*x + c)^4 - 2*(a^4*b + 2*a^2*b^3 + b^5)*cos(d*x + c)^2)*log(-1/4*c
os(d*x + c)^2 + 1/4)*sin(d*x + c) + 60*(a^5 + 2*a^3*b^2 + a*b^4)*cos(d*x + c) - 15*(3*a^4*b + 2*a^2*b^3 - 2*(a
^4*b + a^2*b^3)*cos(d*x + c)^2)*sin(d*x + c))/((a^6*d*cos(d*x + c)^4 - 2*a^6*d*cos(d*x + c)^2 + a^6*d)*sin(d*x
 + c))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**6/(a+b*tan(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.24413, size = 339, normalized size = 2.01 \begin{align*} -\frac{\frac{60 \,{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a^{6}} - \frac{60 \,{\left (a^{4} b^{2} + 2 \, a^{2} b^{4} + b^{6}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{6} b} - \frac{137 \, a^{4} b \tan \left (d x + c\right )^{5} + 274 \, a^{2} b^{3} \tan \left (d x + c\right )^{5} + 137 \, b^{5} \tan \left (d x + c\right )^{5} - 60 \, a^{5} \tan \left (d x + c\right )^{4} - 120 \, a^{3} b^{2} \tan \left (d x + c\right )^{4} - 60 \, a b^{4} \tan \left (d x + c\right )^{4} + 60 \, a^{4} b \tan \left (d x + c\right )^{3} + 30 \, a^{2} b^{3} \tan \left (d x + c\right )^{3} - 40 \, a^{5} \tan \left (d x + c\right )^{2} - 20 \, a^{3} b^{2} \tan \left (d x + c\right )^{2} + 15 \, a^{4} b \tan \left (d x + c\right ) - 12 \, a^{5}}{a^{6} \tan \left (d x + c\right )^{5}}}{60 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^6/(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

-1/60*(60*(a^4*b + 2*a^2*b^3 + b^5)*log(abs(tan(d*x + c)))/a^6 - 60*(a^4*b^2 + 2*a^2*b^4 + b^6)*log(abs(b*tan(
d*x + c) + a))/(a^6*b) - (137*a^4*b*tan(d*x + c)^5 + 274*a^2*b^3*tan(d*x + c)^5 + 137*b^5*tan(d*x + c)^5 - 60*
a^5*tan(d*x + c)^4 - 120*a^3*b^2*tan(d*x + c)^4 - 60*a*b^4*tan(d*x + c)^4 + 60*a^4*b*tan(d*x + c)^3 + 30*a^2*b
^3*tan(d*x + c)^3 - 40*a^5*tan(d*x + c)^2 - 20*a^3*b^2*tan(d*x + c)^2 + 15*a^4*b*tan(d*x + c) - 12*a^5)/(a^6*t
an(d*x + c)^5))/d